// 封装本地存储存储数据与读取数据方法
export const SET_TOKEN = (token: string) => {
  localStorage.setItem("TOKEN", token);
};

export const GET_TOKEN = () => {
  return localStorage.getItem("TOKEN");
};

export const REMOVE_TOKEN = () => {
  localStorage.removeItem("TOKEN");
};

// 主题持久化的储存与读取方法
export const SET_DARK = (dark: string) => {
  localStorage.setItem("DARK", dark);
};
export const GET_DARK = () => {
  return localStorage.getItem("DARK");
};

export const SET_STYLR = (color: string) => {
  localStorage.setItem("GlobalStyle", color);
};
export const GET_STYLR = () => {
  return localStorage.getItem("GlobalStyle");
};
export const REMOVE_STYLR = () => {
  localStorage.removeItem("GlobalStyle");
};
